package cn.wubo.dynamic.schedule.entity;

import cn.wubo.sql.util.annotations.Column;
import cn.wubo.sql.util.annotations.Condition;
import cn.wubo.sql.util.annotations.Key;
import cn.wubo.sql.util.annotations.Table;
import cn.wubo.sql.util.enums.ColumnType;
import cn.wubo.sql.util.enums.GenerationType;
import cn.wubo.sql.util.enums.StatementCondition;
import lombok.Data;

@Table(value = "task_record", desc = "任务记录")
@Data
public class TaskRecord {
    @Key(value = GenerationType.UUID)
    @Column(value = "id", desc = "主键")
    private String id;
    @Condition(value = StatementCondition.LIKE)
    @Column(value = "memo", desc = "描述")
    private String memo;
    @Column(value = "cron", desc = "cron")
    private String cron;
    @Condition(value = StatementCondition.LIKE)
    @Column(value = "method_name", desc = "方法名")
    private String methodName;
    @Condition(value = StatementCondition.LIKE)
    @Column(value = "groovy_context", desc = "groovy脚本", type = ColumnType.TEXT)
    private String groovyContext;
    @Column(value = "is_start_cron", desc = "服务启动时加载任务")
    private String isStartCron;
    @Column(value = "is_start_run", desc = "服务启动时运行")
    private String isStartRun;
}
